<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{

	protected function _initAutoLoader()
	{
		$autoloader = Zend_Loader_Autoloader::getInstance();
		$autoloader->setFallbackAutoloader(true);
	}

	protected function _initCaches()
	{
	    if ($this->hasPluginResource('cachemanager')) {
            $this->bootstrap('cachemanager');
            $cachemanager = $this->getResource('cachemanager');
            if ($cachemanager->hasCache('database')) {
                Zend_Db_Table::setDefaultMetadataCache($cachemanager->getCache('database'));
	        }
            return $cachemanager;
	    }
	    return null;
	}
}

